package Vista;

import java.awt.event.ActionListener;
import java.awt.event.WindowListener;

import javax.swing.*;

import Controlador.ControlSeccion;
public class VistadeSeccion extends JFrame {
    
   
	private static final long serialVersionUID = 1L;
	
	 private ControlSeccion control=null;
	 private JButton btnIngresar,btnSalir;
	 private javax.swing.JLabel lblSeccion;
	 private javax.swing.JPanel jPanel1;
	 private javax.swing.JTextField txtSeccion;

	
	
    public VistadeSeccion() {
    	
    	control=new ControlSeccion(this);
  
        jPanel1 = new JPanel();
        txtSeccion = new JTextField(30);
        lblSeccion = new JLabel();
        btnIngresar = new JButton();
        btnSalir = new JButton();
              
        setTitle("Ingresar Seccion");
        getContentPane().setLayout(null);

        jPanel1.setBackground(java.awt.Color.white);
        jPanel1.setLayout(null);

        jPanel1.add(txtSeccion);
        txtSeccion.setBounds(120,50,120,25);

        lblSeccion.setText("Seccion");
        jPanel1.add(lblSeccion);
        lblSeccion.setBounds(40,50,70,20);
        
        btnIngresar.setText("Ingresar");
        jPanel1.add(btnIngresar);
        btnIngresar.setBounds(50, 150, 100, 20);

        btnSalir.setText("Salir");
        jPanel1.add(btnSalir);
        btnSalir.setBounds(165, 150, 100, 20);

        getContentPane().add(jPanel1);
        jPanel1.setBounds(0, 0, 460, 570);

        pack();
        
        this.addWindowListener((WindowListener) control);
        this.setBounds(375, 195, 320, 270);
		this.setResizable(false);
		this.setVisible(true);
        
    }

    public String getSeccion(){
		return txtSeccion.getText();
	}

 
	public void limpiaCampos(){
		txtSeccion.setText("");
	}
    
       
}

